package edu.hawaii.halealohacli.kmj;

import java.util.TimerTask;
import org.wattdepot.client.WattDepotClient;
/**
 * This is the task for monitor-power to complete until user cancels.
 * @author Eldon Visitacion
 */
public class RepeatTask extends TimerTask {
  protected WattDepotClient client;
  protected String location;
  
  /**
   * Constructs RepeatTask.
   * 
   * @param client client to be used
   * @param location Location to be used
   */
  public RepeatTask(WattDepotClient client, String location) {
    // TODO Auto-generated constructor stub
    this.client = client;
    this.location = location;
  }

  /**
   * The TimerTask task.
   */
  @Override
  public void run() {
    MonitorPower mp = new MonitorPower(client,location);
    mp.printResult();
  }
}
